﻿@model PagedList.IPagedList<Casco.Erz.Models.Position>
@using PagedList.Mvc;
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />
@{
    ViewBag.Title = "卡斯柯招聘-职位搜索";
}

<!--不适用局部视图-->
<div id="hr_searchList">
    <h4 class="hr_grayBorderTitle">职位搜索</h4>
    @using (Html.BeginForm("GetPositionList", "Home", FormMethod.Get, new { CssClassPropertyAttribute = "_searchBox" }))
    {
        @Html.TextBox("searchString", ViewBag.CurrentFilter as string)
        <button type="submit" class="btn btn-default">搜索职位</button>
    }
    <dl>
        <dt>
            工作地点：
        </dt>
        @foreach (var item in ViewBag.PositionItems)
        {
            <dd>
                <a href="@Url.Action("GetPositionList", "Home",new { posType = item.Pname,currentFilter=ViewBag.CurrentFilter})">
                    @item.Pname
                </a>
            </dd>
        }
    </dl>

<!--职务列表-->
    <div id="hr_jobList">
        <table class="hr_table_striped">
            <thead>
                <tr>
                    <th width="40%">职位名称</th>
                    <th>职位类别</th>
                    <th width="14%">工作地点</th>
                    <th>发布时间</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                    <tr>
                        <td><a href="@Url.Action("GetOnePosition", "Home", new { postId=item.PositionID})" target="_blank">@item.Header</a></td>
                        <td>@Html.DisplayFor(modelItem => item.ZwType)</td>
                        <td>@Html.DisplayFor(modelItem => item.GzPlace)</td>
                        <td>@Html.DisplayFor(modelItem => item.BegDate)</td>
                    </tr>
                }
            </tbody>
        </table>

        <div class="hr_pagedList">
            @Html.PagedListPager(Model, page => Url.Action("GetPositionList", new { page, posType = ViewBag.PosType, currentFilter = ViewBag.CurrentFilter }))
        </div>
    </div>
</div>

